<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外观设置 - 拖拽式建站平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --sidebar-width: 240px;
            --header-height: 64px;
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --bg-color: #f5f6f7;
            --card-bg: #ffffff;
            --text-primary: #18191c;
            --text-secondary: #61666d;
            --text-muted: #9499a0;
            --border-color: #e3e5e7;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* 顶部导航栏 */
        .header {
            height: var(--header-height);
            background: var(--card-bg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .sidebar-toggle {
            margin-right: 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 18px;
        }

        .logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            color: var(--primary-color);
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .header-action {
            margin-left: 16px;
            color: var(--text-secondary);
            cursor: pointer;
            position: relative;
        }

        .header-action:hover {
            color: var(--primary-color);
        }

        .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 11px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-menu {
            display: flex;
            align-items: center;
            margin-left: 20px;
            cursor: pointer;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
        }

        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        .sidebar-menu {
            padding: 16px 0;
        }

        .menu-title {
            padding: 10px 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .menu-item:hover {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }

        .menu-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }

        .menu-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }

        /* 内容区域 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .page-title {
            font-size: 24px;
            font-weight: 600;
        }

        .page-actions .btn {
            margin-left: 10px;
        }

        /* 设置区域 */
        .settings-container {
            display: flex;
            flex: 1;
            gap: 20px;
        }

        /* 设置侧边导航 */
        .settings-nav {
            width: 240px;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            flex-shrink: 0;
        }

        .nav-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            font-weight: 500;
            color: var(--text-primary);
        }

        .nav-items {
            padding: 8px 0;
        }

        .nav-item {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .nav-item:hover {
            background: rgba(52, 152, 219, 0.05);
            color: var(--primary-color);
        }

        .nav-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }

        .nav-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }

        /* 设置内容区域 */
        .settings-content {
            flex: 1;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }

        .content-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .content-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .content-description {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .content-body {
            padding: 20px;
            flex: 1;
            overflow-y: auto;
        }

        .settings-section {
            margin-bottom: 32px;
        }

        .section-title {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
        }

        .section-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }

        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }

        .form-select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: white;
            font-size: 14px;
        }

        .form-check {
            display: flex;
            align-items: center;
        }

        .form-check-input {
            margin-right: 8px;
        }

        .form-check-label {
            font-size: 14px;
            color: var(--text-secondary);
        }

        .form-row {
            display: flex;
            gap: 16px;
        }

        .form-col {
            flex: 1;
        }

        .color-picker {
            display: flex;
            align-items: center;
        }

        .color-preview {
            width: 30px;
            height: 30px;
            border-radius: 4px;
            margin-right: 10px;
            border: 1px solid var(--border-color);
        }

        .color-input {
            flex: 1;
        }

        .file-upload {
            position: relative;
            display: inline-block;
            width: 100%;
        }

        .file-input {
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        .file-label {
            display: block;
            padding: 10px 12px;
            border: 1px dashed var(--border-color);
            border-radius: 4px;
            text-align: center;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .file-label:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .image-preview {
            height: 120px;
            border-radius: 4px;
            border: 1px solid var(--border-color);
            margin-top: 10px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            background-color: #f9fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
        }

        .content-footer {
            padding: 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        /* 主题预览区域 */
        .theme-previews {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }

        .theme-preview {
            border: 2px solid var(--border-color);
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .theme-preview:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .theme-preview.active {
            border-color: var(--primary-color);
        }

        .theme-header {
            height: 20px;
            background: #e3e5e7;
        }

        .theme-sidebar {
            display: flex;
            height: 80px;
        }

        .theme-sidebar-nav {
            width: 30%;
            background: #f5f6f7;
        }

        .theme-sidebar-content {
            width: 70%;
            background: white;
        }

        .theme-name {
            text-align: center;
            padding: 8px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* 颜色选择器样式 */
        .color-palette {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }

        .color-option {
            width: 100%;
            height: 40px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

        .color-option:hover {
            transform: scale(1.05);
        }

        .color-option.active::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-weight: bold;
            text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
        }

        /* 字体选择器 */
        .font-selector {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }

        .font-option {
            padding: 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .font-option:hover {
            border-color: var(--primary-color);
        }

        .font-option.active {
            border-color: var(--primary-color);
            background-color: rgba(52, 152, 219, 0.1);
        }

        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn i {
            margin-right: 6px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: #2980b9;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .btn-outline:hover {
            background: #f5f7fa;
        }

        .btn-success {
            background: var(--success-color);
            color: white;
        }

        .btn-success:hover {
            background: #219653;
        }

        .btn-danger {
            background: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background: #c0392b;
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .settings-container {
                flex-direction: column;
            }

            .settings-nav {
                width: 100%;
            }

            .theme-previews {
                grid-template-columns: repeat(2, 1fr);
            }

            .sidebar {
                position: fixed;
                left: -var(--sidebar-width);
                top: var(--header-height);
                bottom: 0;
                z-index: 90;
            }

            .sidebar.open {
                left: 0;
            }

            .overlay {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 80;
                display: none;
            }

            .overlay.open {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 0;
            }

            .theme-previews {
                grid-template-columns: 1fr;
            }

            .font-selector {
                grid-template-columns: repeat(2, 1fr);
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .page-actions {
                margin-top: 16px;
                width: 100%;
                display: flex;
                justify-content: space-between;
            }

            .page-actions .btn {
                margin-left: 0;
                flex: 1;
                margin: 0 5px;
            }
        }
    </style>
</head>

<body>
    <!-- 顶部导航栏 -->
    <div class="header">
        <div class="header-left">
            <div class="sidebar-toggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-puzzle-piece"></i>
                拖拽建站后台
            </div>
        </div>

        <div class="header-right">
            <div class="header-action">
                <i class="fas fa-bell"></i>
                <span class="badge">3</span>
            </div>

            <div class="header-action">
                <i class="fas fa-envelope"></i>
                <span class="badge">5</span>
            </div>

            <div class="user-menu">
                <span>管理员</span>
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-menu">
                <div class="menu-title">主导航</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-home"></i>
                    <span>控制台</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-paint-brush"></i>
                    <span>网站管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>页面管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-th-large"></i>
                    <span>组件库</span>
                </a>

                <div class="menu-title">内容管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-newspaper"></i>
                    <span>文章管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-box"></i>
                    <span>产品管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-images"></i>
                    <span>媒体库</span>
                </a>

                <div class="menu-title">用户与权限</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-shield-alt"></i>
                    <span>角色权限</span>
                </a>
                <a href="#" class="menu-item active">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </a>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content">
            <div class="page-header">
                <h1 class="page-title">系统设置</h1>
                <div class="page-actions">
                    <button class="btn btn-outline">
                        <i class="fas fa-history"></i> 恢复默认
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-save"></i> 保存设置
                    </button>
                </div>
            </div>

            <!-- 设置区域 -->
            <div class="settings-container">
                <!-- 设置导航 -->
                <div class="settings-nav">
                    <div class="nav-header">设置分类</div>
                    <div class="nav-items">
                        <a href="#" class="nav-item">
                            <i class="fas fa-globe"></i>
                            <span>基本设置</span>
                        </a>
                        <a href="#" class="nav-item">
                            <i class="fas fa-lock"></i>
                            <span>安全设置</span>
                        </a>
                        <a href="#" class="nav-item active">
                            <i class="fas fa-paint-brush"></i>
                            <span>外观设置</span>
                        </a>
                        <a href="#" class="nav-item">
                            <i class="fas fa-envelope"></i>
                            <span>邮件设置</span>
                        </a>
                        <a href="#" class="nav-item">
                            <i class="fas fa-database"></i>
                            <span>数据管理</span>
                        </a>
                        <a href="#" class="nav-item">
                            <i class="fas fa-plug"></i>
                            <span>第三方服务</span>
                        </a>
                        <a href="#" class="nav-item">
                            <i class="fas fa-code"></i>
                            <span>自定义代码</span>
                        </a>
                    </div>
                </div>

                <!-- 设置内容 -->
                <div class="settings-content">
                    <div class="content-header">
                        <div class="content-title">外观设置</div>
                        <div class="content-description">自定义平台的整体外观和视觉风格</div>
                    </div>

                    <div class="content-body">
                        <div class="settings-section">
                            <div class="section-title">
                                <i class="fas fa-palette"></i>
                                主题选择
                            </div>

                            <div class="theme-previews">
                                <div class="theme-preview active">
                                    <div class="theme-header" style="background: #3498db;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #2c3e50;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">默认主题</div>
                                </div>

                                <div class="theme-preview">
                                    <div class="theme-header" style="background: #27ae60;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #219653;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">绿色主题</div>
                                </div>

                                <div class="theme-preview">
                                    <div class="theme-header" style="background: #9b59b6;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #8e44ad;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">紫色主题</div>
                                </div>

                                <div class="theme-preview">
                                    <div class="theme-header" style="background: #e74c3c;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #c0392b;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">红色主题</div>
                                </div>

                                <div class="theme-preview">
                                    <div class="theme-header" style="background: #f39c12;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #e67e22;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">橙色主题</div>
                                </div>

                                <div class="theme-preview">
                                    <div class="theme-header" style="background: #34495e;"></div>
                                    <div class="theme-sidebar">
                                        <div class="theme-sidebar-nav" style="background: #2c3e50;"></div>
                                        <div class="theme-sidebar-content" style="background: #f5f6f7;"></div>
                                    </div>
                                    <div class="theme-name">深色主题</div>
                                </div>
                            </div>
                        </div>

                        <div class="settings-section">
                            <div class="section-title">
                                <i class="fas fa-tint"></i>
                                颜色设置
                            </div>

                            <div class="form-group">
                                <label class="form-label">主色调</label>
                                <div class="color-picker">
                                    <div class="color-preview" style="background: #3498db;"></div>
                                    <input type="text" class="form-input color-input" value="#3498db">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="form-label">辅助颜色</label>
                                <div class="color-picker">
                                    <div class="color-preview" style="background: #2c3e50;"></div>
                                    <input type="text" class="form-input color-input" value="#2c3e50">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="form-label">成功颜色</label>
                                <div class="color-palette">
                                    <div class="color-option active" style="background: #27ae60;" data-color="#27ae60">
                                    </div>
                                    <div class="color-option" style="background: #2ecc71;" data-color="#2ecc71"></div>
                                    <div class="color-option" style="background: #1abc9c;" data-color="#1abc9c"></div>
                                    <div class="color-option" style="background: #16a085;" data-color="#16a085"></div>
                                    <div class="color-option" style="background: #3498db;" data-color="#3498db"></div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="form-label">警告颜色</label>
                                <div class="color-palette">
                                    <div class="color-option active" style="background: #f39c12;" data-color="#f39c12">
                                    </div>
                                    <div class="color-option" style="background: #f1c40f;" data-color="#f1c40f"></div>
                                    <div class="color-option" style="background: #e67e22;" data-color="#e67e22"></div>
                                    <div class="color-option" style="background: #d35400;" data-color="#d35400"></div>
                                    <div class="color-option" style="background: #e74c3c;" data-color="#e74c3c"></div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="form-label">危险颜色</label>
                                <div class="color-palette">
                                    <div class="color-option active" style="background: #e74c3c;" data-color="#e74c3c">
                                    </div>
                                    <div class="color-option" style="background: #c0392b;" data-color="#c0392b"></div>
                                    <div class="color-option" style="background: #d63031;" data-color="#d63031"></div>
                                    <div class="color-option" style="background: #e17055;" data-color="#e17055"></div>
                                    <div class="color-option" style="background: #e84393;" data-color="#e84393"></div>
                                </div>
                            </div>
                        </div>

                        <div class="settings-section">
                            <div class="section-title">
                                <i class="fas fa-font"></i>
                                字体设置
                            </div>

                            <div class="form-group">
                                <label class="form-label">主要字体</label>
                                <div class="font-selector">
                                    <div class="font-option active"
                                        style="font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;">
                                        系统默认
                                    </div>
                                    <div class="font-option" style="font-family: 'Helvetica Neue', Arial, sans-serif;">
                                        现代无衬线
                                    </div>
                                    <div class="font-option" style="font-family: Georgia, 'Times New Roman', serif;">
                                        经典衬线
                                    </div>
                                    <div class="font-option" style="font-family: 'Courier New', monospace;">
                                        等宽字体
                                    </div>
                                    <div class="font-option" style="font-family: 'Segoe UI', Tahoma, sans-serif;">
                                        Segoe UI
                                    </div>
                                    <div class="font-option"
                                        style="font-family: -apple-system, BlinkMacSystemFont, sans-serif;">
                                        Apple 系统字体
                                    </div>
                                </div>
                            </div>

                            <div class="form-row">
                                <div class="form-col">
                                    <label class="form-label">基础字体大小</label>
                                    <input type="range" min="12" max="18" value="14" class="form-input">
                                    <div class="form-label" style="text-align: center; margin-top: 4px;">14px</div>
                                </div>
                                <div class="form-col">
                                    <label class="form-label">标题字体缩放</label>
                                    <input type="range" min="100" max="200" value="150" class="form-input">
                                    <div class="form-label" style="text-align: center; margin-top: 4px;">1.5倍</div>
                                </div>
                            </div>
                        </div>

                        <div class="settings-section">
                            <div class="section-title">
                                <i class="fas fa-columns"></i>
                                布局设置
                            </div>

                            <div class="form-group">
                                <label class="form-label">导航栏样式</label>
                                <select class="form-select">
                                    <option>默认样式</option>
                                    <option>简约样式</option>
                                    <option>透明样式</option>
                                    <option>固定顶部</option>
                                </select>
                            </div>

                            <div class="form-group">
                                <label class="form-label">侧边栏宽度</label>
                                <input type="range" min="200" max="300" value="240" class="form-input">
                                <div class="form-label" style="text-align: center; margin-top: 4px;">240px</div>
                            </div>

                            <div class="form-group">
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="boxedLayout" checked>
                                    <label class="form-check-label" for="boxedLayout">盒式布局（有最大宽度限制）</label>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="sidebarCollapse">
                                    <label class="form-check-label" for="sidebarCollapse">可折叠侧边栏</label>
                                </div>
                            </div>
                        </div>

                        <div class="settings-section">
                            <div class="section-title">
                                <i class="fas fa-code"></i>
                                自定义CSS
                            </div>

                            <div class="form-group">
                                <label class="form-label">自定义样式代码</label>
                                <textarea class="form-input form-textarea"
                                    placeholder="/* 在这里添加您的自定义CSS代码 */"></textarea>
                                <div class="form-label"
                                    style="font-size: 12px; color: var(--text-muted); margin-top: 4px;">
                                    这些样式将应用于整个平台界面
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="content-footer">
                        <button class="btn btn-outline">
                            <i class="fas fa-times"></i> 取消
                        </button>
                        <button class="btn btn-primary">
                            <i class="fas fa-save"></i> 保存更改
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 移动端遮罩层 -->
    <div class="overlay"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            // 侧边栏切换
            const sidebarToggle = document.querySelector('.sidebar-toggle');
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.overlay');

            sidebarToggle.addEventListener('click', function () {
                sidebar.classList.toggle('open');
                overlay.classList.toggle('open');
            });

            overlay.addEventListener('click', function () {
                sidebar.classList.remove('open');
                overlay.classList.remove('open');
            });

            // 设置导航项点击
            const navItems = document.querySelectorAll('.nav-item');

            navItems.forEach(item => {
                item.addEventListener('click', function (e) {
                    e.preventDefault();
                    navItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');

                    // 这里可以添加加载对应设置内容的代码
                    const tabName = this.querySelector('span').textContent;
                    document.querySelector('.content-title').textContent = tabName;
                    console.log('切换到设置: ' + tabName);
                });
            });

            // 主题预览点击
            const themePreviews = document.querySelectorAll('.theme-preview');

            themePreviews.forEach(theme => {
                theme.addEventListener('click', function () {
                    themePreviews.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                });
            });

            // 颜色选项点击
            const colorOptions = document.querySelectorAll('.color-option');

            colorOptions.forEach(option => {
                option.addEventListener('click', function () {
                    const parent = this.closest('.form-group');
                    parent.querySelectorAll('.color-option').forEach(o => o.classList.remove('active'));
                    this.classList.add('active');
                });
            });

            // 字体选项点击
            const fontOptions = document.querySelectorAll('.font-option');

            fontOptions.forEach(option => {
                option.addEventListener('click', function () {
                    const parent = this.closest('.form-group');
                    parent.querySelectorAll('.font-option').forEach(o => o.classList.remove('active'));
                    this.classList.add('active');
                });
            });

            // 范围滑块值显示
            const rangeInputs = document.querySelectorAll('input[type="range"]');

            rangeInputs.forEach(input => {
                const display = input.nextElementSibling;

                input.addEventListener('input', function () {
                    if (this.id === 'fontScale') {
                        display.textContent = (this.value / 100).toFixed(1) + '倍';
                    } else {
                        display.textContent = this.value + (this.min >= 200 ? 'px' : 'px');
                    }
                });
            });
        });
    </script>
</body>

</html>